package _2ChouXiangGongChang.impl;


import _2ChouXiangGongChang.Operation;

/**
 * @Div: 除法
 * @author: ZBoHang
 * @time: 2021/9/1 15:36
 */
public class Div implements Operation {
    @Override
    public double getResult(double numberA, double numberB) throws Exception {
        if (numberB == 0) {
            throw new Exception("除数不能为0!");
        }
        return numberA / numberB;
    }
}
